/***************************************************************************
 *   Copyright (C) 2006 by Rene Horn   *
 *   the.rhorn@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU Library General Public     *
 *   License along with this program; if not, write to the                 *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef G2G2EXCEPTION_H
#define G2G2EXCEPTION_H

namespace g2 {

enum ExceptionValues
{
    INKLESS_DEVICE=1,
    COLOR_OUTSIDE_RANGE,
    NONATTACHABLE_DEVICE,
    NOT_ATTACHED,
    IS_ATTACHED,
    INVALID_DASH_COUNT,
    EMPTY_PEN,
    INVALID_SPLINE,
    INVALID_INK
};

/**
Exceptions generated by various g2++ classes.

	@author Rene Horn <the.rhorn@gmail.com>
*/
class g2exception{
public:
    g2exception(const char *message, ExceptionValues exc_type);

    ~g2exception();
    int Type();
    const char* what();

protected:
    char * const m_message;
    const ExceptionValues m_type;
};

}

#endif
